package threadtest;

import java.util.concurrent.TimeUnit;

public class SynchronizedTest {

	private static boolean stopRequested;

	public static void main(String[] args) throws InterruptedException {
		Thread back = new Thread(
				new Runnable(){
					public void run() {
						int i = 0;
						while(!stopRequested) 
							i++;
					};
				}		
		);
		back.start();
		TimeUnit.SECONDS.sleep(1);
		stopRequested = true;
	}
}
